package edu.gatech.cc.liam.core.rl.models;

import java.util.ArrayList;

public class StringAction implements Action {

	private static final long serialVersionUID = -8658259946512347306L;
	
	String theStr;

	public StringAction(String theStr) {
		super();
		this.theStr = theStr;
	}

	public static ArrayList<Action> makeJointStringAction(String ...strings) {
		ArrayList<Action> theJoint = new ArrayList<Action>();
		for(int i=0; i<strings.length; i++) {
			theJoint.add(new StringAction(strings[i]));
		}
		return theJoint;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (obj == null || !getClass().equals(obj.getClass())) {
	        return false;
	     } else {
	    	 return theStr.equals( ((StringAction)obj).theStr );
	     }
	}

	@Override
	public int hashCode() {
		return theStr.hashCode();
	}

	@Override
	public String toString() {
		return theStr.toString();
	}
	
	
}
